//
//  ZYQiniuTool.h
//  ZYNaNian
//
//  Created by apple on 15/12/16.
//  Copyright © 2015年 ZYNaNian. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "QiniuSDK.h"

@interface ZYQiniuTool : NSObject

+ (void)putData:(NSData *)data key:(NSString *)key token:(NSString *)token complete:(void(^)(id info, NSDictionary *resp))complete option:(QNUploadOption *)option;

+ (void)putFile:(NSString *)file key:(NSString *)key token:(NSString *)token complete:(void(^)(id info, NSDictionary *resp))complete option:(QNUploadOption *)option;

+ (void)putAsset:(id)asset key:(NSString *)key token:(NSString *)token complete:(void(^)(id info, NSDictionary *resp))complete option:(QNUploadOption *)option;

+ (void)putPHAsset:(PHAsset *)asset key:(NSString *)key token:(NSString *)token complete:(void(^)(id info, NSDictionary *resp))complete option:(QNUploadOption *)option;

+ (void)putALAsset:(ALAsset *)asset key:(NSString *)key token:(NSString *)token complete:(void(^)(id info, NSDictionary *resp))complete option:(QNUploadOption *)option;

/**
 *  保存数据
 *
 *  @param size 数据大小
 *
 *  @return 数据路径
 */
+ (NSString *)saveTempfileWithData:(NSData *)data fileName:(NSString *)fileName;
/**
 *  移除数据
 *
 *  @param path 数据路径
 */
+ (void)removeTempfile:(NSURL *)fileUrl;

///**
// *    可选参数的初始化方法
// *
// *    @param mimeType     mime类型
// *    @param progress     进度函数
// *    @param params       自定义服务器回调参数
// *    @param check        是否进行crc检查
// *    @param cancellation 中途取消函数
// *
// *    @return 可选参数类实例
// */
//- (QNUploadOption *)uploadOptionWithMime:(NSString *)mimeType
//             progressHandler:(QNUpProgressHandler)progress
//                      params:(NSDictionary *)params
//                    checkCrc:(BOOL)check
//          cancellationSignal:(QNUpCancellationSignal)cancellation;

@end
